package com.zc.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import com.zc.domain.FourPointsItem;

@Repository
public interface ITemDao {
	@Select("SELECT timestamp,wd1,wd2,wd3,wd4 FROM ${tableName} ORDER BY timestamp DESC LIMIT 24;")
	@Results({
		@Result(column = "timeStamp",property = "timeStamp"),
		@Result(column = "wd1",property = "data_1"),
		@Result(column = "wd2",property = "data_2"),
		@Result(column = "wd3",property = "data_3"),
		@Result(column = "wd4",property = "data_4"),
	})
	List<FourPointsItem> getTemperature(@Param("tableName") String tableName);
}
